Ext.define('PackageManager.rules.Functions', {
    singleton: true,

    changeFinalValue: function(key, value) {
        console.log('21312');
        var store = Ext.data.StoreManager.lookup('ComponentStore');
        var comp = store.findRecord('key', key);
        comp.data.finalValue = value;
        comp.setDirty();
    },
    getFinalValue: function(key) {
        return Ext.data.StoreManager.lookup('ComponentStore').findRecord('key', key).data.finalValue;
    },

    checkFinalValue: function(key, value) {
        return this.getFinalValue(key) == value;
    },

    checkFinalValues: function(key1, value1, key2, value2) {
        return (this.getFinalValue(key1) == value1) && (this.getFinalValue(key2) == value2);
    }

});
